<script lang="ts">
    import { Empty } from "../Empty";
    import { useTableContext } from "./Table.svelte";

    const props = $props();
    const ctx: any = useTableContext();
</script>

<tr>
    <td colSpan={props.store.columns.length}>
        <div class="cm-table-empty-cell">
            {#if typeof ctx?.empty === "function"}
                {@render ctx.empty()}
            {:else}
                <Empty desc={props.emptyText} />
            {/if}
        </div>
    </td>
</tr>
